home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
tclib20.zip
/
FILEHK.H
< prev
next >
Wrap
C/C++ Source or Header
|
1988-12-03
|
2KB
|
39 lines
/* TCHK 2.0 - Howard Kapustein's Turbo C library 12-3-88 */
/* Copyright (C) 1988, Howard Kapustein. All rights reserved. */
/* filehk.h - header file for file routines */
#ifndef FILEHK_HEADER
#define FILEHK_HEADER 1
#include <howard.h>
#ifndef FILEHK_DEFINES
typedef struct filespec {
char drive;
char path[81]; /* all strings */
char filename[13]; /* are ASCIIZ */
};
typedef struct fnameext {
char filename[9];
char ext[4];
};
#define FNAMESIZE 96 /* [d:][80 char path][filename].[ext] */
#define PATHSIZE 100 /* used for making variables to manipulate path stuff */
#define FILEHK_DEFINES 1
#endif
/* function prototypes */
int getfname(byte row, byte col, char *returnstr, char *pattern,
int argn, int argk[],char flags); /* get a filename.ext */
int set_handles(int handles); /* set handle count (DOS 3.3) */
int fname_match(char *fname1, char *fname2);/* compare filename with wildcards *,? */
boolean isdir(char *fspec); /* is fspec a subdirectory */
struct filespec *parsefilename(char *fspec);/* break fspec into d: path filename ext */
int fncmp(char *fname1, char *fname2); /* compare filename 1 w/filename 2 */
struct fnameext *parsefnameext(char *filename); /* break filename.ext into filename & ext */
char *expandfilespec(char *filespec, char *dest); /* expand filespec into full d:\path\filename.ext w/wildcards */
char *getfilespec(char *s); /* fix file specs for proper dir searching */
#endif /* FILEHK_HEADER */